<template>
  <div class="loadingx" @touchmove.prevent v-if="loadingVisible">
    <div class="loadingx-wrap">
      <div class="loadingx-wrap-shade"></div>
      <div class="loadingx-wrap-img">
        <img src="https://img.wifenxiao.com/h5-wfx/images/public/loading3.gif" alt />
      </div>
      <!--<div class="loadingx-wrap-app">加载中</div>-->
    </div>
  </div>
</template>


<script>
import Vue from 'vue'
/**
 * @Author: yqe@360shop.cn
 * @Date: 2019-12-02 10:29:38
 * @Last Modified by: zhangmeng
 * @Last Modified time: 2020-08-13 16:58:19
 */
export default Vue.extend({
  name: 'index',
  data() {
    return {
      loadingVisible: true
    }
  },
  methods: {
    /**
     * 打开弹层
     */
    show() {
      this.loadingVisible = true
    },
    /**
     * 关闭弹层
     */
    close() {
      this.loadingVisible = false
    }
  },
  destroy() {
    this.$destroy()
    document.body.removeChild(this.$el)
  }
})
</script>

<style  lang="scss">
.loadingx {
  position: fixed;
  z-index: 999999;
  height: 100vh;
  width: 100%;
  top: 0;
  left: 0;
  &-wrap {
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    &-shade {
      position: absolute;
      z-index: 1;
      width: 100%;
      height: 100%;
      /*background: rgba(0,0,0,.1);*/
    }
    &-app {
      position: relative;
      z-index: 2;
      color: #fff;
    }
    &-img {
      img {
        width: 120px;
      }
    }
  }
}
</style>
